\def\StruktBoxHeight{6}
\begin{struktogramm}(130,137)[\underline{atomKollision(Atom a, boolean checkOnly)}]
    \assign[\StruktBoxHeight]{float x, y, r, rsum, mdist, x2, y2}
    \assign[\StruktBoxHeight]{x, y, r aus dem Atom laden}

    \while[\StruktBoxHeight]{F\"ur alle Atome b in Liste}
        \ifthenelse[12]{1}{1}{a = b}{ja}{nein}
            \return[\StruktBoxHeight]{false}
        \change
        \ifend
        \assign[\StruktBoxHeight]{x2, y2 von Atom b laden}

        \ifthenelse[12]{1}{3}{|k - x2| > rsum \(\vee\) |y-y2| > rsum}{ja}{nein}
        \change
            \assign[\StruktBoxHeight]{\(mdist \leftarrow (x - x2)^2 + (y - y2)^2\)}

            \ifthenelse[12]{3}{1}{\(mdist < rsum^2\)}{ja}{nein}
            
                \ifthenelse[12]{1}{2}{checkOnly}{true}{false}
                \return[\StruktBoxHeight]{true}
                \change
                    \sub[\StruktBoxHeight]{stoss(a,b)}
                    \sub[\StruktBoxHeight]{entwirre(a,b)}
                \ifend

            \change

            \ifend

        
        \ifend


    \whileend
    \return[\StruktBoxHeight]{false}
\end{struktogramm}